Integrand size = 25, antiderivative size = 246 \[ \int \cos ^3(e+f x) \sqrt {a+b \sec ^2(e+f x)} \, dx=\frac {\cos ^2(e+f x) \sin (e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}}{3 f}+\frac {(2 a+b) \sqrt {\cos ^2(e+f x)} E\left (\arcsin (\sin (e+f x))\left |\frac {a}{a+b}\right .\right ) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}}{3 a f \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}-\frac {b (a+b) \sqrt {\cos ^2(e+f x)} \operatorname {EllipticF}\left (\arcsin (\sin (e+f x)),\frac {a}{a+b}\right ) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )} \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}{3 a f \left (a+b-a \sin ^2(e+f x)\right )} \]
[Out]
Time = 0.37 (sec) , antiderivative size = 246, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.360, Rules used = {4233, 1985, 1986, 428, 538, 437, 435, 432, 430} \[ \int \cos ^3(e+f x) \sqrt {a+b \sec ^2(e+f x)} \, dx=-\frac {b (a+b) \sqrt {\cos ^2(e+f x)} \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}} \sqrt {\sec ^2(e+f x) \left (-a \sin ^2(e+f x)+a+b\right )} \operatorname {EllipticF}\left (\arcsin (\sin (e+f x)),\frac {a}{a+b}\right )}{3 a f \left (-a \sin ^2(e+f x)+a+b\right )}+\frac {(2 a+b) \sqrt {\cos ^2(e+f x)} \sqrt {\sec ^2(e+f x) \left (-a \sin ^2(e+f x)+a+b\right )} E\left (\arcsin (\sin (e+f x))\left |\frac {a}{a+b}\right .\right )}{3 a f \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}+\frac {\sin (e+f x) \cos ^2(e+f x) \sqrt {\sec ^2(e+f x) \left (-a \sin ^2(e+f x)+a+b\right )}}{3 f} \]
[In]
[Out]
Rule 428
Rule 430
Rule 432
Rule 435
Rule 437
Rule 538
Rule 1985
Rule 1986
Rule 4233
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \left (1-x^2\right ) \sqrt {a+\frac {b}{1-x^2}} \, dx,x,\sin (e+f x)\right )}{f} \\ & = \frac {\text {Subst}\left (\int \left (1-x^2\right ) \sqrt {\frac {a+b-a x^2}{1-x^2}} \, dx,x,\sin (e+f x)\right )}{f} \\ & = \frac {\left (\sqrt {\cos ^2(e+f x)} \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}\right ) \text {Subst}\left (\int \sqrt {1-x^2} \sqrt {a+b-a x^2} \, dx,x,\sin (e+f x)\right )}{f \sqrt {a+b-a \sin ^2(e+f x)}} \\ & = \frac {\cos ^2(e+f x) \sin (e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}}{3 f}+\frac {\left (2 \sqrt {\cos ^2(e+f x)} \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}\right ) \text {Subst}\left (\int \frac {a+b+\frac {1}{2} (-2 a-b) x^2}{\sqrt {1-x^2} \sqrt {a+b-a x^2}} \, dx,x,\sin (e+f x)\right )}{3 f \sqrt {a+b-a \sin ^2(e+f x)}} \\ & = \frac {\cos ^2(e+f x) \sin (e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}}{3 f}-\frac {\left ((-2 a-b) \sqrt {\cos ^2(e+f x)} \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}\right ) \text {Subst}\left (\int \frac {\sqrt {a+b-a x^2}}{\sqrt {1-x^2}} \, dx,x,\sin (e+f x)\right )}{3 a f \sqrt {a+b-a \sin ^2(e+f x)}}-\frac {\left (b (a+b) \sqrt {\cos ^2(e+f x)} \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1-x^2} \sqrt {a+b-a x^2}} \, dx,x,\sin (e+f x)\right )}{3 a f \sqrt {a+b-a \sin ^2(e+f x)}} \\ & = \frac {\cos ^2(e+f x) \sin (e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}}{3 f}-\frac {\left ((-2 a-b) \sqrt {\cos ^2(e+f x)} \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}\right ) \text {Subst}\left (\int \frac {\sqrt {1-\frac {a x^2}{a+b}}}{\sqrt {1-x^2}} \, dx,x,\sin (e+f x)\right )}{3 a f \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}-\frac {\left (b (a+b) \sqrt {\cos ^2(e+f x)} \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )} \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1-x^2} \sqrt {1-\frac {a x^2}{a+b}}} \, dx,x,\sin (e+f x)\right )}{3 a f \left (a+b-a \sin ^2(e+f x)\right )} \\ & = \frac {\cos ^2(e+f x) \sin (e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}}{3 f}+\frac {(2 a+b) \sqrt {\cos ^2(e+f x)} E\left (\arcsin (\sin (e+f x))\left |\frac {a}{a+b}\right .\right ) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}}{3 a f \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}-\frac {b (a+b) \sqrt {\cos ^2(e+f x)} \operatorname {EllipticF}\left (\arcsin (\sin (e+f x)),\frac {a}{a+b}\right ) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )} \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}{3 a f \left (a+b-a \sin ^2(e+f x)\right )} \\ \end{align*}
Result contains complex when optimal does not.
Time = 13.40 (sec) , antiderivative size = 402, normalized size of antiderivative = 1.63 \[ \int \cos ^3(e+f x) \sqrt {a+b \sec ^2(e+f x)} \, dx=\frac {\cos (e+f x) \sqrt {a+b \sec ^2(e+f x)} \left (\frac {6 \sqrt {2} \sqrt {a+2 b+a \cos (2 (e+f x))} E\left (e+f x\left |\frac {a}{a+b}\right .\right )}{\sqrt {\frac {a+2 b+a \cos (2 (e+f x))}{a+b}}}+\frac {\sqrt {-\frac {1}{b}} b \csc ^2(2 (e+f x)) \sec (2 (e+f x)) \left (4 i \sqrt {2} \left (a^2+3 a b+2 b^2\right ) \sqrt {-\frac {a \cos ^2(e+f x)}{b}} E\left (i \text {arcsinh}\left (\frac {\sqrt {-\frac {1}{b}} \sqrt {a+2 b+a \cos (2 (e+f x))}}{\sqrt {2}}\right )|\frac {b}{a+b}\right ) \sqrt {\frac {a \sin ^2(e+f x)}{a+b}}+a \left (a \sqrt {-\frac {1}{b}} \sqrt {a+2 b+a \cos (2 (e+f x))} (-1+\cos (4 (e+f x)))-4 i \sqrt {2} (a+b) \sqrt {-\frac {a \cos ^2(e+f x)}{b}} \operatorname {EllipticF}\left (i \text {arcsinh}\left (\frac {\sqrt {-\frac {1}{b}} \sqrt {a+2 b+a \cos (2 (e+f x))}}{\sqrt {2}}\right ),\frac {b}{a+b}\right ) \sqrt {\frac {a \sin ^2(e+f x)}{a+b}}\right )\right ) \sin (4 (e+f x))}{2 a^2}\right )}{12 f \sqrt {a+2 b+a \cos (2 (e+f x))}} \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 7.23 (sec) , antiderivative size = 6300, normalized size of antiderivative = 25.61
[In]
[Out]
\[ \int \cos ^3(e+f x) \sqrt {a+b \sec ^2(e+f x)} \, dx=\int { \sqrt {b \sec \left (f x + e\right )^{2} + a} \cos \left (f x + e\right )^{3} \,d x } \]
[In]
[Out]
Timed out. \[ \int \cos ^3(e+f x) \sqrt {a+b \sec ^2(e+f x)} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \cos ^3(e+f x) \sqrt {a+b \sec ^2(e+f x)} \, dx=\int { \sqrt {b \sec \left (f x + e\right )^{2} + a} \cos \left (f x + e\right )^{3} \,d x } \]
[In]
[Out]
\[ \int \cos ^3(e+f x) \sqrt {a+b \sec ^2(e+f x)} \, dx=\int { \sqrt {b \sec \left (f x + e\right )^{2} + a} \cos \left (f x + e\right )^{3} \,d x } \]
[In]
[Out]
Timed out. \[ \int \cos ^3(e+f x) \sqrt {a+b \sec ^2(e+f x)} \, dx=\int {\cos \left (e+f\,x\right )}^3\,\sqrt {a+\frac {b}{{\cos \left (e+f\,x\right )}^2}} \,d x \]
[In]
[Out]